import request from '@/utils/request'
const BASE_Daily = '/wage/daily-wage'
const BASE_MONTHLY = '/wage/pay-slip'

// 日工资统计
export function dailyWageStatistic(data) {
    return request({
        url: `${BASE_Daily}/dailyWage`,
        method: 'get',
        params: data
    })
}

// 日工资列表
export function dailyWageList(data) {
    return request({
        url: `${BASE_Daily}/dailyWageList`,
        method: 'get',
        params: data
    })
}

// 确认单人日工资
export function confirmDailyWage(data) {
    return request({
        url: `${BASE_Daily}/confirmDailyWage`,
        method: 'post',
        data: data
    })
}

//删除日工资统计
export function deleteDailyWage(data) {
    return request({
        url: `${BASE_Daily}/deleteDailyWage`,
        method: 'get',
        params: data
    })
}

//删除日工资列表
export function deleteDailyWageList(data) {
    return request({
        url: `${BASE_Daily}/deleteDailyWageList`,
        method: 'get',
        params: data
    })
}

// 添加月工资
export function insertMonthlyWage(data) {
    return request({
        url: `/wage/pay-slip/insert`,
        method: 'post',
        data: data
    })
}
// 月工资详情
export function monthlyDetail(data) {
    return request({
        url: `${BASE_Daily}/monthlyDetail`,
        method: 'get',
        params: data
    })
}

//查看单人日工资详情
export function personDailyWageDetail(data) {
    return request({
        url: `${BASE_Daily}/personDailyWageDetail`,
        method: 'get',
        params: data
    })
}

//调整单人日工资
export function updateDailyWage(data) {
    return request({
        url: `${BASE_Daily}/updateDailyWage`,
        method: 'post',
        data: data
    })
}

// 月工资统计--待生成工资单人员列表
export function paySlipList(data) {
    return request({
        url: `${BASE_MONTHLY}/generatePaySlip/list`,
        method: 'get',
        params: data
    })
}

// 生成工资单记录
export function generatePaySlip(data) {
    return request({
        url: `${BASE_MONTHLY}/generatePaySlip`,
        method: 'post',
        params: data
    })
}

// 发放工资单
export function grantPaySlip(data) {
    return request({
        url: `${BASE_MONTHLY}/grantPaySlip`,
        method: 'post',
        data: data
    })
}

// 人员月工资列表(项目/劳务工资/班组)
export function laborDistList(data) {
    return request({
        url: `${BASE_MONTHLY}/laborDist/list`,
        method: 'get',
        params: data
    })
}

// 月劳务代发列表
export function monthLaborDistList(data) {
    return request({
        url: `${BASE_MONTHLY}/monthLaborDist/list`,
        method: 'get',
        params: data
    })
}

// 人员月工资详情
export function monthlyWageDetail(data) {
    return request({
        url: `${BASE_MONTHLY}/monthlyWageDetail`,
        method: 'get',
        params: data
    })
}
//调整奖金与罚款
export function fineAndBonus(data) {
    return request({
        url: `${BASE_MONTHLY}/update/fineAndBonus`,
        method: 'post',
        data: data
    })
}
//待生成工资单的公司列表
export function generateCorporationList(data) {
    return request({
        url: `${BASE_MONTHLY}/generatePaySlip/corporation/list`,
        method: 'get',
        params: data
    })
}